﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:wpfLoaders="clr-namespace:WPFLoaders">
    
    <!-- Awesome spinner recreated from the JavaScript one made by Luke Richardville -->
    <!-- http://codepen.io/lukerichardville/ http://codepen.io/lukerichardville/pen/fwjor -->
    <DataTemplate x:Key="RainbowStarLoader">
        <Grid Width="125" Height="125">
            <wpfLoaders:RadialLoader Width="125" Height="125" Radius="40" NumberOfElements="30" HorizontalAlignment="Center" VerticalAlignment="Center">
                <wpfLoaders:RadialLoader.Animation>
                    <Storyboard Duration="0:0:2" RepeatBehavior="Forever">
                        <DoubleAnimation Storyboard.TargetProperty="Width" From="1" To="20" Duration="0:0:1"/>
                    </Storyboard>
                </wpfLoaders:RadialLoader.Animation>
                <wpfLoaders:RadialLoader.ElementTemplate>
                    <DataTemplate>
                        <Rectangle Width="20" Height="4" Fill="{Binding Converter={x:Static wpfLoaders:ColorScaleConverter.Instance}}" Opacity="0.5"/>
                    </DataTemplate>
                </wpfLoaders:RadialLoader.ElementTemplate>
            </wpfLoaders:RadialLoader>
            <wpfLoaders:RadialLoader Width="150" Height="150" Radius="40" NumberOfElements="30" AnimationOffsetScale="5" HorizontalAlignment="Center" VerticalAlignment="Center">
                <wpfLoaders:RadialLoader.Animation>
                    <Storyboard Duration="0:0:2" RepeatBehavior="Forever">
                        <DoubleAnimation Storyboard.TargetProperty="Width" From="1" To="20" Duration="0:0:1" AutoReverse="True"/>
                    </Storyboard>
                </wpfLoaders:RadialLoader.Animation>
                <wpfLoaders:RadialLoader.ElementTemplate>
                    <DataTemplate>
                        <Rectangle Width="20" Height="4" Fill="{Binding Converter={x:Static wpfLoaders:ColorScaleConverter.Instance}}">
                            <Rectangle.RenderTransform>
                                <ScaleTransform ScaleX="-1"/>
                            </Rectangle.RenderTransform>
                        </Rectangle>
                    </DataTemplate>
                </wpfLoaders:RadialLoader.ElementTemplate>
            </wpfLoaders:RadialLoader>
        </Grid>
    </DataTemplate>
    
</ResourceDictionary>